import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{
			path: '/',
			redirect: '/home',
		},
		{
			path: '/home',
			component: () => import('@/views/home/home.vue'),
			name: 'home',
		},
		{
			path: '/favor',
			component: () => import('@/views/favor/favor.vue'),
			name: 'favor',
		},
		{
			path: '/message',
			component: () => import('@/views/message/message.vue'),
			name: 'message',
			meta: {
				hideTabBar: true,
			},
		},
		{
			path: '/order',
			component: () => import('@/views/order/order.vue'),
			name: 'order',
		},
		{
			path: '/search',
			component: () => import('@/views/search/search.vue'),
			name: 'search',
			meta: {
				hideTabBar: true,
			},
		},
		{
			path: '/city',
			component: () => import('@/views/city/city.vue'),
			name: 'city',
			meta: {
				hideTabBar: true,
			},
		},
		{
			path: '/detail/:id',
			component: () => import('@/views/detail/detail.vue'),
			name: 'detail',
			/* meta: {
				hideTabBar: true,
			}, */
		},
	],
})

export default router
